import { createRouter, createWebHistory } from "vue-router";
import Accident from "@/pages/solutions/Accident.vue";
import WasteChemical from "@/pages/solutions/WasteChemical.vue";
import Chemical from "@/pages/solutions/Chemical.vue";
import Equipment from "@/pages/solutions/Equipment.vue";
import Consumable from "@/pages/solutions/Consumable.vue";
import EquipmentalPersonnel from "@/pages/solutions/EquipmentalPersonnel.vue";
import SafetyEducation from "@/pages/solutions/SafetyEducation.vue"
import SafetyStudy from "@/pages/safetyStudy/Index.vue"
import SolutionIndex from "@/pages/solutions/Index.vue"
import Home from '@/pages/home/HomePage.vue'

export default createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/home',
      children: [
        {
          path: 'index',
          component: Home
        }
      ]
    },
    {
      path: "/safetyStudy/index",
      component: SafetyStudy
    },
    {
      path: "/solution",
      children: [
        {
          path: 'index',
          component: SolutionIndex,
        },
        {
          path: "accident",
          component: Accident,
        },
        {
          path: "wasteChemical",
          component: WasteChemical,
        },
        {
          path: "chemical",
          component: Chemical,
        },
        {
          path: "equipment",
          component: Equipment,
        },
        {
          path: "consumable",
          component: Consumable,
        },
        {
          path: "equipmentalPersonnel",
          component: EquipmentalPersonnel,
        },
        {
          path: "safetyEducation",
          component: SafetyEducation
        }
      ],
      redirect: '/solution/index'
    },
  ],
});
